import redis

# 链接对象
red = redis.StrictRedis(host='localhost', port=6379, db=0)

# string
# red.set("name","张三")

# 获取,返回的bytes
name = red.get("name")
print(name)
print(name.decode("utf-8"))

red.close()